﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EzDesk.Core.Model;
using EzDesk.DevHelper.DbMgr.Presenters;
using EzDesk.Utility;

namespace EzDesk.DevHelper.DbMgr.Views
{
    public partial class DataProcessPanel : UserControl,IDataProcessView
    {
        private DataProcessPresenter _presenter;

        public DataProcessPanel()
        {
            InitializeComponent();
            _presenter = new DataProcessPresenter(this);
        }


        public void WriteLine(string p)
        {
            (this.ParentForm as ILogView).WriteLine(p);
        }

        private void btnExportFeedXml_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _presenter.ExportFeedTemplateXml();
        }

        private void btnExportAppFunctions_Click(object sender, EventArgs e)
        {
            _presenter.ExporttAppFunctionXml();
        }

        private void btnExportCoreXml_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _presenter.ExportCoreXml();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            _presenter.InitializeAll();
        }

        private void btnImportFeedTemplates_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _presenter.ImportFeedTemplates();
        }

        private void btnImportAppFunctions_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _presenter.ImportAppFunctions();
        }

        private void btnImportCoreInfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _presenter.ImportCoreInfos();
        }





    }
}
